package co.edu.usbcali.egrapico.vista.tools;

import co.edu.usbcali.egrapico.vista.ambient.LabelIdeOpe;
import co.edu.usbcali.egrapico.vista.ambient.LabelProgram;
import co.edu.usbcali.egrapico.vista.ambient.PanelMethod;

public class JPanelTranferHandlerMethod extends StringTransferHandler {

    protected void importString(javax.swing.JComponent c, String str) {
        PanelMethod target = (PanelMethod) c;
        try {
            target.setSelected(true);
        } catch (java.beans.PropertyVetoException e) {
        }
        javax.swing.ImageIcon I0 = new javax.swing.ImageIcon(getClass().getResource("/co/edu/usbcali/egrapico/images/program.gif"));
        javax.swing.ImageIcon I12 = new javax.swing.ImageIcon(getClass().getResource("/co/edu/usbcali/egrapico/images/argument.gif"));
        LabelProgram labe0 = new LabelProgram();
        LabelIdeOpe label6 = new LabelIdeOpe();
        if (str.equals("Program") && target.getProgram() < 1) {
            labe0.setIcon(I0);
            labe0.setHorizontalTextPosition(javax.swing.JLabel.CENTER);
            labe0.setVerticalTextPosition(javax.swing.JLabel.BOTTOM);
            labe0.setName(str);
            labe0.setLocation(target.getLPane().getMousePosition());
            labe0.setSize(90, 90);
            target.addLayeredPane(labe0);
        } else if (str.equals("Argument")) {
            label6.setIcon(I12);
            label6.setHorizontalTextPosition(javax.swing.JLabel.CENTER);
            label6.setVerticalTextPosition(javax.swing.JLabel.BOTTOM);
            label6.setName(str);
            label6.setId("id2");
            label6.setLocation(target.getLPane().getMousePosition());
            label6.setSize(90, 90);
            target.addLayeredPane(label6);
        }
    }
}